The Flash Objects API > Flash objects overview > SWFFile.getObjectType()

 

SWFFile.getObjectType()

Description

Returns the Flash object type— the value that was passed in the dwType parameter when the file was created by the SWFFile.createFile() function.

Arguments

fileName

fileName is a path to a Flash Object file, expressed as a file://URL. This file is usually an .swf file.

Returns

A string representing the object type, or null if the file is not a Flash Object file or if the file could not be found.

Example

The following code checks to see if the file, test.swf, is a Flash object of type myType:

if ( SWFFile.getObjectType("file:///MyMac/test.swf") == "myType" ){
	alert ("This is a myType object.");
}else{
	alert ("This is not a myType object.");
}